#include "tcpClient.hpp"

#include <iostream>
#include <memory>

using namespace client;
using namespace std;

static void Usage(string proc)
{
    cout<<"\nUsage:\n\t"<<proc<<"serverip serverport\n\n";
}

// ./tcpClient serverip serverpotr
int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        Usage(argv[0]);
        exit(1);
    }

    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);

    unique_ptr<tcpClient> tcli(new tcpClient(serverip,serverport));

    tcli->initClient();
    tcli->run();

    return 0;
}

